import request from '@/utils/request'

const {
    get: $get,
    post: $post,
    delete: $delete,
    download: $download,
    upload: $upload,
} = request


// 查询避难场站全部
export const riskShelterList = data => {
  return $get('/risk/riskShelter/list', data)
}

// 查询避难场站列表
export const riskShelterPage = data => {
  return $get('/risk/riskShelter/page', data)
}

// 新增避难场站
export const riskShelterAdd = data => {
  return $post('/risk/riskShelter/add', data)
}

// 查询避难场站详情
export const riskShelterDetail = id => {
  return $get('/risk/riskShelter/detail/'+ id)
}

// 更新避难场站
export const riskShelterUpdate = data => {
  return $post('/risk/riskShelter/update', data)
}

// 删除避难场站
export const riskShelterDelete = id => {
  return $post('/risk/riskShelter/delete/'+ id)
}

// 导出避难场站
export const riskShelterExport = (data,fileName) => {
  return $download('/risk/riskShelter/export',data, fileName)
}

// 下载模板
export const riskShelterTemplate = (data,filename) => {
  return $download('/risk/riskShelter/template',data, filename)
}

// 导入
export const riskShelterImport = (formData) => {
  return $upload('/risk/riskShelter/import', formData)
}
